Integrand size = 14, antiderivative size = 117 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=2 (a+b \text {arctanh}(c x))^2 \text {arctanh}\left (1-\frac {2}{1-c x}\right )-b (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )+b (a+b \text {arctanh}(c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1-c x}\right )+\frac {1}{2} b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )-\frac {1}{2} b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1-c x}\right ) \]
-2*(a+b*arctanh(c*x))^2*arctanh(-1+2/(-c*x+1))-b*(a+b*arctanh(c*x))*polylo g(2,1-2/(-c*x+1))+b*(a+b*arctanh(c*x))*polylog(2,-1+2/(-c*x+1))+1/2*b^2*po lylog(3,1-2/(-c*x+1))-1/2*b^2*polylog(3,-1+2/(-c*x+1))
Result contains complex when optimal does not.
Time = 0.44 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.29 \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=a^2 \log (c x)+a b (-\operatorname {PolyLog}(2,-c x)+\operatorname {PolyLog}(2,c x))+b^2 \left (\frac {i \pi ^3}{24}-\frac {2}{3} \text {arctanh}(c x)^3-\text {arctanh}(c x)^2 \log \left (1+e^{-2 \text {arctanh}(c x)}\right )+\text {arctanh}(c x)^2 \log \left (1-e^{2 \text {arctanh}(c x)}\right )+\text {arctanh}(c x) \operatorname {PolyLog}\left (2,-e^{-2 \text {arctanh}(c x)}\right )+\text {arctanh}(c x) \operatorname {PolyLog}\left (2,e^{2 \text {arctanh}(c x)}\right )+\frac {1}{2} \operatorname {PolyLog}\left (3,-e^{-2 \text {arctanh}(c x)}\right )-\frac {1}{2} \operatorname {PolyLog}\left (3,e^{2 \text {arctanh}(c x)}\right )\right ) \]
a^2*Log[c*x] + a*b*(-PolyLog[2, -(c*x)] + PolyLog[2, c*x]) + b^2*((I/24)*P i^3 - (2*ArcTanh[c*x]^3)/3 - ArcTanh[c*x]^2*Log[1 + E^(-2*ArcTanh[c*x])] + ArcTanh[c*x]^2*Log[1 - E^(2*ArcTanh[c*x])] + ArcTanh[c*x]*PolyLog[2, -E^( -2*ArcTanh[c*x])] + ArcTanh[c*x]*PolyLog[2, E^(2*ArcTanh[c*x])] + PolyLog[ 3, -E^(-2*ArcTanh[c*x])]/2 - PolyLog[3, E^(2*ArcTanh[c*x])]/2)
Time = 0.76 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.22, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6448, 6614, 6620, 7164}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx\) |
\(\Big \downarrow \) 6448 |
\(\displaystyle 2 \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2-4 b c \int \frac {(a+b \text {arctanh}(c x)) \text {arctanh}\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2}dx\) |
\(\Big \downarrow \) 6614 |
\(\displaystyle 2 \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2-4 b c \left (\frac {1}{2} \int \frac {(a+b \text {arctanh}(c x)) \log \left (2-\frac {2}{1-c x}\right )}{1-c^2 x^2}dx-\frac {1}{2} \int \frac {(a+b \text {arctanh}(c x)) \log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2}dx\right )\) |
\(\Big \downarrow \) 6620 |
\(\displaystyle 2 \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2-4 b c \left (\frac {1}{2} \left (\frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))}{2 c}-\frac {1}{2} b \int \frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{1-c^2 x^2}dx\right )+\frac {1}{2} \left (\frac {1}{2} b \int \frac {\operatorname {PolyLog}\left (2,\frac {2}{1-c x}-1\right )}{1-c^2 x^2}dx-\frac {\operatorname {PolyLog}\left (2,\frac {2}{1-c x}-1\right ) (a+b \text {arctanh}(c x))}{2 c}\right )\right )\) |
\(\Big \downarrow \) 7164 |
\(\displaystyle 2 \text {arctanh}\left (1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))^2-4 b c \left (\frac {1}{2} \left (\frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1-c x}\right ) (a+b \text {arctanh}(c x))}{2 c}-\frac {b \operatorname {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{4 c}\right )+\frac {1}{2} \left (\frac {b \operatorname {PolyLog}\left (3,\frac {2}{1-c x}-1\right )}{4 c}-\frac {\operatorname {PolyLog}\left (2,\frac {2}{1-c x}-1\right ) (a+b \text {arctanh}(c x))}{2 c}\right )\right )\) |
2*(a + b*ArcTanh[c*x])^2*ArcTanh[1 - 2/(1 - c*x)] - 4*b*c*((((a + b*ArcTan h[c*x])*PolyLog[2, 1 - 2/(1 - c*x)])/(2*c) - (b*PolyLog[3, 1 - 2/(1 - c*x) ])/(4*c))/2 + (-1/2*((a + b*ArcTanh[c*x])*PolyLog[2, -1 + 2/(1 - c*x)])/c + (b*PolyLog[3, -1 + 2/(1 - c*x)])/(4*c))/2)
3.1.19.3.1 Defintions of rubi rules used
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)/(x_), x_Symbol] :> Simp[2*(a + b*ArcTanh[c*x])^p*ArcTanh[1 - 2/(1 - c*x)], x] - Simp[2*b*c*p Int[(a + b *ArcTanh[c*x])^(p - 1)*(ArcTanh[1 - 2/(1 - c*x)]/(1 - c^2*x^2)), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1]
Int[(ArcTanh[u_]*((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*( x_)^2), x_Symbol] :> Simp[1/2 Int[Log[1 + u]*((a + b*ArcTanh[c*x])^p/(d + e*x^2)), x], x] - Simp[1/2 Int[Log[1 - u]*((a + b*ArcTanh[c*x])^p/(d + e *x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d + e, 0] && EqQ[u^2 - (1 - 2/(1 - c*x))^2, 0]
Int[(Log[u_]*((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^ 2), x_Symbol] :> Simp[(-(a + b*ArcTanh[c*x])^p)*(PolyLog[2, 1 - u]/(2*c*d)) , x] + Simp[b*(p/2) Int[(a + b*ArcTanh[c*x])^(p - 1)*(PolyLog[2, 1 - u]/( d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d + e, 0] && EqQ[(1 - u)^2 - (1 - 2/(1 - c*x))^2, 0]
Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /; !FalseQ[w]] /; FreeQ[n, x]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 6.10 (sec) , antiderivative size = 630, normalized size of antiderivative = 5.38
method | result | size |
parts | \(a^{2} \ln \left (x \right )+b^{2} \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )^{2}-\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )+\frac {\operatorname {polylog}\left (3, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )}{2}-\operatorname {arctanh}\left (c x \right )^{2} \ln \left (\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}-1\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1+\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1-\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\frac {i \pi \,\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \left (\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )+{\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )}^{2}\right ) \operatorname {arctanh}\left (c x \right )^{2}}{2}\right )+2 a b \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\frac {\operatorname {dilog}\left (c x +1\right )}{2}-\frac {\ln \left (c x \right ) \ln \left (c x +1\right )}{2}-\frac {\operatorname {dilog}\left (c x \right )}{2}\right )\) | \(630\) |
derivativedivides | \(a^{2} \ln \left (c x \right )+b^{2} \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )^{2}-\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )+\frac {\operatorname {polylog}\left (3, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )}{2}-\operatorname {arctanh}\left (c x \right )^{2} \ln \left (\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}-1\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1+\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1-\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\frac {i \pi \,\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \left (\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )+{\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )}^{2}\right ) \operatorname {arctanh}\left (c x \right )^{2}}{2}\right )+2 a b \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\frac {\operatorname {dilog}\left (c x +1\right )}{2}-\frac {\ln \left (c x \right ) \ln \left (c x +1\right )}{2}-\frac {\operatorname {dilog}\left (c x \right )}{2}\right )\) | \(632\) |
default | \(a^{2} \ln \left (c x \right )+b^{2} \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )^{2}-\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )+\frac {\operatorname {polylog}\left (3, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right )}{2}-\operatorname {arctanh}\left (c x \right )^{2} \ln \left (\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}-1\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1+\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, -\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\operatorname {arctanh}\left (c x \right )^{2} \ln \left (1-\frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+2 \,\operatorname {arctanh}\left (c x \right ) \operatorname {polylog}\left (2, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )-2 \operatorname {polylog}\left (3, \frac {c x +1}{\sqrt {-c^{2} x^{2}+1}}\right )+\frac {i \pi \,\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \left (\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )\right ) \operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )-\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right ) \operatorname {csgn}\left (\frac {i}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )+{\operatorname {csgn}\left (\frac {i \left (-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}-1\right )}{1-\frac {\left (c x +1\right )^{2}}{c^{2} x^{2}-1}}\right )}^{2}\right ) \operatorname {arctanh}\left (c x \right )^{2}}{2}\right )+2 a b \left (\ln \left (c x \right ) \operatorname {arctanh}\left (c x \right )-\frac {\operatorname {dilog}\left (c x +1\right )}{2}-\frac {\ln \left (c x \right ) \ln \left (c x +1\right )}{2}-\frac {\operatorname {dilog}\left (c x \right )}{2}\right )\) | \(632\) |
a^2*ln(x)+b^2*(ln(c*x)*arctanh(c*x)^2-arctanh(c*x)*polylog(2,-(c*x+1)^2/(- c^2*x^2+1))+1/2*polylog(3,-(c*x+1)^2/(-c^2*x^2+1))-arctanh(c*x)^2*ln((c*x+ 1)^2/(-c^2*x^2+1)-1)+arctanh(c*x)^2*ln(1+(c*x+1)/(-c^2*x^2+1)^(1/2))+2*arc tanh(c*x)*polylog(2,-(c*x+1)/(-c^2*x^2+1)^(1/2))-2*polylog(3,-(c*x+1)/(-c^ 2*x^2+1)^(1/2))+arctanh(c*x)^2*ln(1-(c*x+1)/(-c^2*x^2+1)^(1/2))+2*arctanh( c*x)*polylog(2,(c*x+1)/(-c^2*x^2+1)^(1/2))-2*polylog(3,(c*x+1)/(-c^2*x^2+1 )^(1/2))+1/2*I*Pi*csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1)/(1-(c*x+1)^2/(c^2*x^2- 1)))*(csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1))*csgn(I/(1-(c*x+1)^2/(c^2*x^2-1))) -csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1))*csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1)/(1-( c*x+1)^2/(c^2*x^2-1)))-csgn(I*(-(c*x+1)^2/(c^2*x^2-1)-1)/(1-(c*x+1)^2/(c^2 *x^2-1)))*csgn(I/(1-(c*x+1)^2/(c^2*x^2-1)))+csgn(I*(-(c*x+1)^2/(c^2*x^2-1) -1)/(1-(c*x+1)^2/(c^2*x^2-1)))^2)*arctanh(c*x)^2)+2*a*b*(ln(c*x)*arctanh(c *x)-1/2*dilog(c*x+1)-1/2*ln(c*x)*ln(c*x+1)-1/2*dilog(c*x))
\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=\int { \frac {{\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2}}{x} \,d x } \]
\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=\int \frac {\left (a + b \operatorname {atanh}{\left (c x \right )}\right )^{2}}{x}\, dx \]
\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=\int { \frac {{\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2}}{x} \,d x } \]
a^2*log(x) + integrate(1/4*b^2*(log(c*x + 1) - log(-c*x + 1))^2/x + a*b*(l og(c*x + 1) - log(-c*x + 1))/x, x)
\[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=\int { \frac {{\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2}}{x} \,d x } \]
Timed out. \[ \int \frac {(a+b \text {arctanh}(c x))^2}{x} \, dx=\int \frac {{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2}{x} \,d x \]